﻿#include <iostream>
#include <string>
using namespace std;


int main()
{
    string numbers, word = "";
    int multi = 100;
    int number = 0;
    int count = 0;
    getline(cin, numbers);
    numbers += " ";
    for (char ch : numbers)
    {
        if (ch == ' ')
        {
            count++;
            if (word == "zero")
            {
                word.clear();
                number += 0 * multi;
            }
            else if (word == "one")
            {
                word.clear();
                number += 1 * multi;
            }
            else if (word == "two")
            {
                word.clear();
                number += 2 * multi;
            }
            else if (word == "three")
            {
                word.clear();
                number += 3 * multi;
            }
            else if (word == "four")
            {
                word.clear();
                number += 4 * multi;
            }
            else if (word == "five")
            {
                word.clear();
                number += 5 * multi;
            }
            else if (word == "six")
            {
                word.clear();
                number += 6 * multi;
            }
            else if (word == "seven")
            {
                word.clear();
                number += 7 * multi;
            }
            else if (word == "eight")
            {
                word.clear();
                number += 8 * multi;
            }
            else if (word == "nine")
            {
                word.clear();
                number += 9 * multi;
            }
            multi /= 10;
        }
        else word += ch;
    }
    if (number >= 100 && number <= 999 && count == 3)
    {
        cout << number << endl;
    }
    else cout << "Wrong input";
}


